BUG: detect and ignore cyclic symbolic link chains in sdist - #900
Conversation
rgommers
left a comment
There was a problem hiding this comment.
Thanks @dnicolodi. This fix seems incomplete: it drops all symlink chains now, rather than only cycles. Try adding a ccc.py symlink to the test case, so there's a chain with length >1 (ccc -> bbb -> aaa). Then ccc.py goes missing from the sdist.
Actual file targets that symlinks point to probably need keeping track of separately.
| # Detect symbolic link chains resulting in a cycle. | ||
| if name in visited: | ||
| warnings.warn( | ||
| 'symbolic link resultin in a cycle ignored: {name}', stacklevel=1) |
There was a problem hiding this comment.
This misses the f prefix for an f-string.
a2ea080 to
5ae80b6
Compare
|
Thanks for the review @rgommers. I also found another subtle bug for which symbolic link chains crossing directories where not resolved correctly. All problems should be fixed now. I added one more test file to make sure. |
rgommers
left a comment
There was a problem hiding this comment.
LGTM now, thanks @dnicolodi. There's one typo you may want to fix before merging, other than that it's all happy it seems.
Avoid coping the object describing the tar file member when it does not need to be modified (directories, spacial files, and symbolic links that have not been resolved).
5ae80b6 to
e507abb
Compare
|
Thanks for the review @rgommers. Typo fixed. Merging. |
Fixes #870.